/*
File:	replication_master 
Date:	24 June 2025 

Description: Runs all scripts (do-files) for replicating the empirical analysis 

Note:	All tables are output on screen. Figures are stored on disk as PDFs. 
*/


* Time stamp for log file 
local today = c(current_date)
local time = subinstr(c(current_time), ":", "_", .)


log using "replication_`today'_`time'.log", text replace 

version 17 
capture drop _all 


/*

	Required dependencies (third-party packages) 
	
		* plotplain 
		* reghdfe 
		* xtevent 

*/

* If not already installed, check the packages first before installing: 
* net describe reghdfe 
* net describe reghdfe xtevent 
* findit plotplain 


/* Load main data set */

use replication, clear 

/* Set graph color scheme to plain */  

set scheme plotplain 


/*
	Clear old estimates 
*/

eststo clear 

/*
	Run script reproducing descriptive information from main text 
*/

do replication_descriptive  

/*
	Run script reproducing main analysis in main text
*/


do replication_main-analysis 


/*
	Run script reproducing additional analyses and info from Appendix
*/

do replication_additional  

log close 
